{include file="public/layout" /}

<body style="overflow: auto; cursor: default; -moz-user-select: inherit;background-color:#F4F4F4;">
<div id="append_parent"></div>
<div id="ajaxwaitid"></div>
{include file="system/left" /}
<div id="geduan_div" class="h15"></div>
<div class="page" style="min-width:auto;margin-left:115px;padding-bottom: 15px;">
    <div class="flexigrid">
        <div class="mDiv pt0">
            <div class="ftitle">
                {eq name="'Shop@address_add'|is_check_access" value="1"}
                <div class="fbutton"><a href="{:url('Shop/address_add')}"><div class="add"><span><i class="layui-icon layui-icon-addition"></i>新增地址</span></div></a></div>
                {/eq}
            </div>
            <form class="navbar-form form-inline" action="" method="get" onsubmit="layer_loading('正在处理');">
                {$searchform.hidden|default=''}
                <div class="sDiv">
                    <div class="sDiv2">
                        <input type="text" size="30" name="keywords" value="" class="qsbox" placeholder="搜索相关数据...">
                        <input type="submit" class="btn" value="搜索">
                        <i class="iconfont e-sousuo"></i>
                    </div>
                </div>
            </form>
        </div>

        <div class="hDiv">
            <div class="hDivBox">
                <table cellpadding="0" cellspacing="0" style="width: 100%">
                    <thead>
                    <tr>
                        <th abbr="article_title" axis="col3" class="w50">
                            <div class="tc">ID</div>
                        </th>
                        <th abbr="ac_id" axis="col4" class="w200">
                            <div class="text-l10">退货地址名称</div>
                        </th>
                        <th axis="col6" class="w160">
                            <div class="tc">联系人</div>
                        </th>
                        <th axis="col6" class="w160">
                            <div class="tc">手机号</div>
                        </th>
                        <th axis="col6" class="">
                            <div class="text-l10">详细地址</div>
                        </th>
                        <th axis="col6" class="w80">
                            <div class="tc">是否默认</div>
                        </th>
                        <th axis="col6" class="w100">
                            <div class="tc">操作</div>
                        </th>
                    </tr>
                    </thead>
                </table>
            </div>
        </div>

        <div class="bDiv" style="height: auto;">
            <div id="flexigrid" cellpadding="0" cellspacing="0" border="0">
                <table style="width: 100%">
                    <tbody>
                    {empty name="list"}
                    <tr>
                        <td class="no-data" align="center" axis="col0" colspan="50">
                            <div class="no_row">
                                <div class="no_pic"><img src="__SKIN__/images/null-data.png"></div>
                            </div>
                        </td>
                    </tr>
                    {else/}
                    {foreach name="list" item="vo" key="k" }
                    <tr>
                        <!-- <td class="sign">
                            <div class="w40 tc">
                                <input type="checkbox" name="ids[]" value="{$vo.coupon_id}">
                            </div>
                        </td> -->
                        <td class="sort">
                            <div class="tc w50">
                                {if condition="$pager->nowPage > 1"}
                                    {$pager->listRows * ($pager->nowPage-1) + $k+1}
                                {else /}
                                    {$k+1}
                                {/if}
                            </div>
                        </td>
                        <td>
                            <div class="w200 text-l10">
                                {empty name="$vo.title"}暂无名称{else/}{$vo.title}{/empty}
                            </div>
                        </td>
                        <td>
                            <div class="w160 tc">
                                {$vo.contact}
                            </div>
                        </td>

                        <td>
                            <div class="w160 tc">
                                {$vo.mobile}
                            </div>
                        </td>
                        <td style="width: 100%">
                            <div class="text-l10">
                                {$vo.province}{$vo.city}{$vo.area}{$vo.address}
                            </div>
                        </td>
                        <td class="">
                            <div class="tc w80">
                                {if condition="$vo['default'] eq 1"}
                                    <span class="yes" {eq name="'Shop@address_edit'|is_check_access" value="1"}onClick="changeTableVal('shop_return_address','id','{$vo.id}','default',this);"{/eq} data-yestext='<i class="fa fa-check-circle"></i>' data-notext='<i class="fa fa-ban"></i>'><i class="fa fa-check-circle"></i></span>
                                {else /}
                                    <span class="no" {eq name="'Shop@address_edit'|is_check_access" value="1"}onClick="changeTableVal('shop_return_address','id','{$vo.id}','default',this);"{/eq} data-yestext='<i class="fa fa-check-circle"></i>' data-notext='<i class="fa fa-ban"></i>'><i class="fa fa-ban"></i></span>
                                {/if}
                            </div>
                        </td>
                        <td class="operation">
                            <div class="w100 tc">
                                {eq name="$Think.const.CONTROLLER_NAME.'@address_edit'|is_check_access" value="1"}
                                <a href="{:url('Shop/address_edit',array('id'=>$vo['id']))}" class="btn blue">
                                    编辑
                                </a>
                                {/eq}
                                {eq name="$Think.const.CONTROLLER_NAME.'@address_del'|is_check_access" value="1"}
                                <i></i>
                                {empty name="$vo.default"}
                                <a class="btn red" href="javascript:void(0);" data-url="{:url('Shop/address_del')}" data-id="{$vo.id}" onClick="delfun(this);">
                                    删除
                                </a>
                                {else /}
                                <a class="btn grey" href="javascript:void(0);">
                                    删除
                                </a>
                                {/empty}

                                {/eq}
                            </div>
                        </td>
                        <!--<td class="sort">-->
                        <!--<div class="w60 tc">-->
                        <!--{eq name="$Think.const.CONTROLLER_NAME.'@edit'|is_check_access" value="1"}-->
                        <!--<input type="text" onchange="changeTableVal('shop_coupon', 'coupon_id', '{$vo.coupon_id}', 'sort_order' ,this);" size="4" value="{$vo.sort_order}" />-->
                        <!--{else /}-->
                        <!--{$vo.sort_order}-->
                        <!--{/eq}-->
                        <!--</div>-->
                        <!--</td>-->
                    </tr>
                    {/foreach}
                    {/empty}
                    </tbody>
                </table>
            </div>
            <div class="iDiv" style="display: none;"></div>
        </div>

        <div class="tDiv">
            <div class="tDiv2">
                {include file="public/page" /}
            </div>
            <div style="clear:both"></div>
        </div>
    </div>
</div>
{include file="public/footer" /}
<script type="text/javascript">
    // function set_default(obj) {
    //     layer_loading('正在处理');
    //     $.ajax({
    //         type : 'post',
    //         url : $(obj).attr('data-url'),
    //         data : {},
    //         dataType : 'json',
    //         success : function(res){
    //             layer.closeAll();
    //             if(res.code == 1){
    //                 layer.msg(res.msg, {icon: 1, shade: layer_shade, time: 1000}, function(){
    //                     window.location.reload();
    //                 });
    //             }else{
    //                 showErrorMsg(res.msg);
    //             }
    //         },
    //         error: function(e){
    //             layer.closeAll();
    //             showErrorAlert(e.responseText);
    //         }
    //     });
    // }
</script>